|
|
|
|
|
|
|
This function takes any string and reverses all the letters. About the only use I can think of for this function is as a part of an encryption routine for a password. You can pass in the password to this function, reverse the password, and then continue to apply other algorithms to encrypt the password into a nonreadable format. Here are some examples: |
|
|
|
 |
|
|
|
|
StrReverse("PDSA, Inc.") = .cnI ,ASDP
StrReverse("mom") = mom
StrReverse("dad") = dad |
|
|
|
|
|
|
|
|
If you need to get a month name for a particular number from 1 to 12, you can pass that numeric value to the MonthName() function to have it return the month name. Here are some examples: |
|
|
|
 |
|
|
|
|
MonthName(Month(Now)) = October
MonthName(2) = February
MonthName(2, True) = Feb |
|
|
|
|
|
|
|
|
If you pass a True value as the second parameter, the MonthName() function will abbreviate the month name thats returned. |
|
|
|
|
|
|
|
|
The WeekdayName function returns the day of the week for a value between 1 and 7. You can use the DatePart() function to extract the weekday from a date value. If you pass True as the second parameter, the WeekdayName function abbreviates the name of the weekday returned. You may pass in a constant as the third parameter to specify the starting day of the week. Therefore, if you only want to calculate work days, you can pass in the constant vbMonday as the third parameter. Here are some examples: |
|
|
|
 |
|
|
|
|
WeekdayName(DatePart("w", Now)) = Monday
WeekdayName(2) = Monday
WeekdayName(2, True) = Mon
WeekdayName(2, False, vbMonday) = Tuesday
WeekdayName(2, True, vbMonday) = Tue |
|
|
|
|
|